package com.ourteam.product.ui.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-14 15:16:23 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductUIImageBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.ui.dao.ProductUIImage productUIImage;

  protected BeanMap getBeanMap() {

    return new BeanMap(productUIImage);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.ui.dao.IProductUIImageDAO.Id);

    mappedDaoFields.put("domainId", com.ourteam.product.ui.dao.IProductUIImageDAO.DomainId);

    mappedDaoFields.put("imageCode", com.ourteam.product.ui.dao.IProductUIImageDAO.ImageCode);

    mappedDaoFields.put("imagePath", com.ourteam.product.ui.dao.IProductUIImageDAO.ImagePath);

    mappedDaoFields.put("imageWidth", com.ourteam.product.ui.dao.IProductUIImageDAO.ImageWidth);

    mappedDaoFields.put("imageHeight", com.ourteam.product.ui.dao.IProductUIImageDAO.ImageHeight);

    mappedDaoFields.put("imageType", com.ourteam.product.ui.dao.IProductUIImageDAO.ImageType);

    mappedDaoFields.put(
        "lastModifyUser", com.ourteam.product.ui.dao.IProductUIImageDAO.LastModifyUser);

    mappedDaoFields.put(
        "lastModifyTime", com.ourteam.product.ui.dao.IProductUIImageDAO.LastModifyTime);

    mappedDaoFields.put("status", com.ourteam.product.ui.dao.IProductUIImageDAO.Status);

    mappedDaoFields.put("remarks", com.ourteam.product.ui.dao.IProductUIImageDAO.Remarks);

    mappedDaoFields.put("domainCode", com.ourteam.product.ui.dao.IProductUIImageDAO.DomainCode);

    mappedDaoFields.put("domainName", com.ourteam.product.ui.dao.IProductUIImageDAO.DomainName);

    mappedDaoFields.put("imageContent", com.ourteam.product.ui.dao.IProductUIImageDAO.ImageContent);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductUIImageBean() {
    super();

    this.productUIImage = new com.ourteam.product.ui.dao.ProductUIImage();
  }

  public ProductUIImageBean(com.ourteam.product.ui.dao.ProductUIImage productUIImage) {
    super();

    this.productUIImage = productUIImage;
  }

  public com.ourteam.product.ui.dao.ProductUIImage convertToProductUIImage() {
    return this.productUIImage;
  }

  public com.ourteam.product.ui.dao.ProductUIImage convertTo() {
    return this.productUIImage;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productUIImage.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productUIImage.setId(id);
  }

  /**
   * Get domainId
   *
   * @return long
   */
  public long getDomainId() {
    return (long) this.productUIImage.getDomainId();
  }

  /**
   * Set domainId
   *
   * @parameter long
   */
  public void setDomainId(long domainId) {

    this.productUIImage.setDomainId(domainId);
  }

  /**
   * Get imageCode
   *
   * @return String
   */
  public String getImageCode() {
    return (String) this.productUIImage.getImageCode();
  }

  /**
   * Set imageCode
   *
   * @parameter String
   */
  public void setImageCode(String imageCode) {

    this.productUIImage.setImageCode(imageCode);
  }

  /**
   * Get imagePath
   *
   * @return String
   */
  public String getImagePath() {
    return (String) this.productUIImage.getImagePath();
  }

  /**
   * Set imagePath
   *
   * @parameter String
   */
  public void setImagePath(String imagePath) {

    this.productUIImage.setImagePath(imagePath);
  }

  /**
   * Get imageWidth
   *
   * @return int
   */
  public int getImageWidth() {
    return (int) this.productUIImage.getImageWidth();
  }

  /**
   * Set imageWidth
   *
   * @parameter int
   */
  public void setImageWidth(int imageWidth) {

    this.productUIImage.setImageWidth(imageWidth);
  }

  /**
   * Get imageHeight
   *
   * @return int
   */
  public int getImageHeight() {
    return (int) this.productUIImage.getImageHeight();
  }

  /**
   * Set imageHeight
   *
   * @parameter int
   */
  public void setImageHeight(int imageHeight) {

    this.productUIImage.setImageHeight(imageHeight);
  }

  /**
   * Get imageType
   *
   * @return String
   */
  public String getImageType() {
    return (String) this.productUIImage.getImageType();
  }

  /**
   * Set imageType
   *
   * @parameter String
   */
  public void setImageType(String imageType) {

    this.productUIImage.setImageType(imageType);
  }

  /**
   * Get lastModifyUser
   *
   * @return String
   */
  public String getLastModifyUser() {
    return (String) this.productUIImage.getLastModifyUser();
  }

  /**
   * Set lastModifyUser
   *
   * @parameter String
   */
  public void setLastModifyUser(String lastModifyUser) {

    this.productUIImage.setLastModifyUser(lastModifyUser);
  }

  /**
   * Get lastModifyTime
   *
   * @return java.util.Date
   */
  public java.util.Date getLastModifyTime() {
    return (java.util.Date) this.productUIImage.getLastModifyTime();
  }

  /**
   * Set lastModifyTime
   *
   * @parameter java.util.Date
   */
  public void setLastModifyTime(java.util.Date lastModifyTime) {

    this.productUIImage.setLastModifyTime(lastModifyTime);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productUIImage.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productUIImage.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productUIImage.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productUIImage.setRemarks(remarks);
  }

  /**
   * Get domainCode
   *
   * @return String
   */
  public String getDomainCode() {

    return (String) this.productUIImage.getDomainCode();
  }

  /**
   * Get domainName
   *
   * @return String
   */
  public String getDomainName() {

    return (String) this.productUIImage.getDomainName();
  }

  /**
   * Get imageContent
   *
   * @return byte
   */
  public byte[] getImageContent() {
    return (byte[]) this.productUIImage.getImageContent();
  }

  /**
   * Set imageContent
   *
   * @parameter byte
   */
  public void setImageContent(byte[] imageContent) {

    this.productUIImage.setImageContent(imageContent);
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductUIImageBean) == false) {
      return false;
    } // end if

    ProductUIImageBean other = (ProductUIImageBean) obj;

    boolean isEqual = false;

    com.ourteam.product.ui.dao.ProductUIImage tempProductUIImage = other.convertToProductUIImage();

    if (tempProductUIImage == null || this.productUIImage == null) {
      isEqual = false;
    } else if (tempProductUIImage == this.productUIImage
        || tempProductUIImage.equals(this.productUIImage)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductUIImageBean[] toArray(
      com.ourteam.product.ui.dao.ProductUIImage[] aProductUIImages) {

    return toArray(aProductUIImages, null);
  }

  public static ProductUIImageBean[] toArray(
      com.ourteam.product.ui.dao.ProductUIImage[] aProductUIImages,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductUIImages)) {
      return new ProductUIImageBean[0];
    }

    int length = aProductUIImages.length;

    ProductUIImageBean[] beans = new ProductUIImageBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductUIImageBean(aProductUIImages[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductUIImages[i]});
      }
    }

    return beans;
  }
}
